Hey,
Trying to make displacement work here:
_HandleCamera:
CamUp# = MouseMoveY() * 0.25
CamLeft# = MouseMoveX() * 0.25
CamX# = Camera Position X()
CamY# = Camera Position Y()
CamZ# = Camera Position Z()
PosX# = Object Position X(Player.NObj)
PosY# = Object Position Y(Player.NObj)
PosZ# = Object Position Z(Player.NObj)
If UpKey()
inc PosX#,sin( Object angle Y(Player.NObj) )*5
inc PosZ#,cos( Object angle Y(Player.NObj) )*5
Endif
Rotate Object Player.NObj, Object Angle X(Player.NObj), Object Angle Y(Player.NObj) + CamLeft#, Object Angle Z(Player.NObj)
Position Camera Object Position X(Player.NObj), Object Position Y(Player.NObj), Object Position Z(Player.NObj)
YRotate Camera Object Angle Y(Player.NObj)
ZRotate Camera Object Angle Z(Player.NObj)
XRotate Camera Camera Angle X() + CamUp#
Print PosX#
Print PosY#
Print PosZ#
Phy Set Character Controller Displacement Player.NObj, PosX#, Object Position Y(Player.NObj), PosZ#
PHY Move Character controller Player.NObj, 0.1
PHY Move Character controller Player.NObj, -0.1
Print Object Position Y(Player.NObj)
return
Just sits there, doing nothing...
Kinda weird, PHY Move Character controller Player.NObj, 0.1 and PHY Move Character controller Player.NObj, -0.1 placed before the displacement did not help either...
Can anyone sort this out for me?
Thanks!
Jeff
You're the
'th to view this signature!