Kollision zwischen zwei Childs eine Parents
Übersicht

KruemelatorBetreff: Kollision zwischen zwei Childs eine Parents |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Mein Problem ist folgendes:
Ich habe zwei Entitys welche beide Childs von einem Pivot sind. Dabei liegt das eine auf dem anderen, und wird nach untengezogen, was die Kollision ja verhindern soll. Wenn ich jetzt aber das Parent drehe, findet keine Kollision statt. Das aber auch nur dann wenn das Bodenentity in das Fallentity "hineingedreht" wird, wenn es unter ihm "hinweg" gedreht wird dann nicht. Aber das Fallentity wird ja auch gedreht, ansieht ändert sich ja nur die Richtung in die da Fallentity gezogen wird, die Position zu einander bleibt ja gleich. Code: [AUSKLAPPEN] Graphics3D 800,600,16,2
SetBuffer BackBuffer() Global camera=CreateCamera() CameraViewport camera,0,0,800,600 CameraRange camera,0.001,100 light=CreateLight() Global mxs# Global mys# Global mzs# drehpunkt = CreatePivot() PositionEntity drehpunkt,0,3,5 kiste = CreateCube() PositionEntity kiste,-1,0,5 EntityType kiste,1 EntityColor kiste,255,0,0 EntityParent kiste,drehpunkt cube=CreateCube() PositionEntity cube,0,-2,5 ScaleEntity cube,4,1,4 EntityType cube,2 EntityParent cube,drehpunkt fpsrate=CreateTimer(60) While Not KeyHit(1) WaitTimer(fpsrate) mxs# = MouseXSpeed() mys# = MouseYSpeed() mzs# = MouseZSpeed() TranslateEntity kiste,0,-0.1,0,1 Collisions 1,2,2,3 If KeyDown(203) Then TurnEntity drehpunkt,0,0,-0.5 MoveEntity kiste,0.1,0,0 EndIf If KeyDown(205) Then TurnEntity drehpunkt,0,0,0.5 MoveEntity kiste,-0.1,0,0 EndIf cammove() UpdateWorld RenderWorld Flip Wend End Function cammove() TurnEntity camera,mys#/10,mxs#/-10,0 RotateEntity camera,EntityPitch(camera),EntityYaw(camera),0 MoveMouse 400,300 If KeyDown(17) Then MoveEntity camera,0,0,0.1 If KeyDown(31) Then MoveEntity camera,0,0,-0.1 If KeyDown(30) Then MoveEntity camera,-0.1,0,0 If KeyDown(32) Then MoveEntity camera,0.1,0,0 TranslateEntity camera,0,mzs#/2,0 End Function |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group