Posted: 14th Aug 2009 12:32
Hello to all from Spain.
Do not speak groin, I have utilized a translator to write this pardon else they understand it.
I am trying to make an object that a car may move as it were, but without utilizing the own orders of the vehicle with the following instructions:
load object "coclhe.x", 10
position object 10,125,3,-125
phy make material 1, "my material"
phy set material dynamic friction 1, 0.5
phy set material static friction 1, 0.5
phy set material restitution 1, 0.0
phy build material 1
phy set bounce threshold 0.0
phy make rigid body dynamic box 10,1
phy set rigid body mass 10, 1000000
-------------------------------------------------------
velo_linear_x# = phy get rigid body linear velocity x ( 10 )
velo_linear_y# = phy get rigid body linear velocity y ( 10 )
velo_linear_z# = phy get rigid body linear velocity z ( 10 )
if upkey ( ) = 1
PHY ADD RIGID BODY local FORCE 10,0,0,2,2
endif
if downkey ( ) = 1
PHY ADD RIGID BODY local FORCE 10,0,0,-2,2
endif
if leftkey ( ) = 1
phy set rigid body angular velocity 10, 0, -0.5, 0
endif
if rightkey ( ) = 1
phy set rigid body angular velocity 10, 0, 0.5, 0
endif
---------------
phy update
sync
loop
------------------
I do not get it altogether because the cube that I use, slip very much, and I do not manage to brake it suddenly, neither I manage to turn it well.
Help please