Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / DarkPhysics bug - no rigid body rotation(except manual i.e turning a corner, not ricochet) in my home-made hovercar driving engine

Author
Message
no one
18
Years of Service
User Offline
Joined: 16th Jun 2006
Location:
Posted: 30th Dec 2006 12:37
I have an extremely annoying bug with a rounded cube dynamic convex rigid body that refuses to rotate when bouncing, friction or anything else that I do not do manually do (i.e "Phy set rigid body angular velocity")

Note: My current project is a hovercar racing game and the body in question is the car's "collision shape" made in Caligari Gamespace, as well as the car and they (should) fit perfectly.



You need the external files, it takes a long time to load, and unless you have a HUGE+ computer, you should turn all except your essential applications off.(I will post them separately)

<?>
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 30th Dec 2006 18:54
You using the .phy extension too? Maybe it will become universal

As for your problem - I'm not sure. So the convex represents the car, correct? Prehaps if you made it a vehicle (you'd have to add 4 new wheel limbs I think) and position the wheels lower then the actual hovercraft, then hide the wheels, it would appear to be floating and you can use vehicle control.

Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 30th Dec 2006 19:16
Currently there is a problem/bug whereby a material is not applied to a convex body. Try using a dynamic mesh/box and see if it works.

Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog.
no one
18
Years of Service
User Offline
Joined: 16th Jun 2006
Location:
Posted: 2nd Jan 2007 12:32
Thanks. I'll try that.

<?>
no one
18
Years of Service
User Offline
Joined: 16th Jun 2006
Location:
Posted: 2nd Jan 2007 13:01
Oh, well...
I tried the mesh and got an error:
Quote: "
Trying to collide two pmap-less,noconvex,nonheightfield meshes:this is no longer supported!
"

The other one still has the same bug: no rotation except when I call
Rotation restored!(my mistake-unless you press the arrow keys I programmed it not to budge) although the collision shape isn't anything like what it should be. Any ideas?
Quote: "
REM Project: Hover racing championship
REM Created: 16/12/2006 13:37:33
REM
REM ***** Main Source File *****
REM
sync on;sync rate 9000
autocam off
set window title "Loading..."
minimize window
sync
set camera range 1,90000
phy start
phy set gravity 0,-50.0,0
phy make material 1,"slippery"
phy set material restitution 1,0.01
phy set material static friction 1,0.00001
phy set material dynamic friction 1,1.5
phy build material 1
load object "Colobject0.x",1
`scale object 1,150,150,150
`hide object 1
load object "Rocket ship2.x",5
position object 1,0,700,0
phy set rigid body terrain extent -4024
phy make rigid body dynamic convex 1,1
`phy load rigid body dynamic convex 1,"Rocket ship.phy",1
load object "Mountain road.x",2
position object 2,0,0,0
set object collision to polygons 2
phy make rigid body static terrain 2,"Mountain road.phy",1
`phy load rigid body static terrain 2,"Mountain road.phy"
`sc_setupcomplexobject 2,0,2
make object sphere 3,100
`set object collision to spheres 3
hide object 3
`sc_setupobject 3,0,0
load object "sky.x",4
scale object 4,90000,90000,90000
`hide object 4
yrotate object 5,180
fix object pivot 5
maximize window
phy set rigid body mass 1,300.5
set window title "Hover racing champoinship"
do
`sc_updateobject 3
`x#=camera position x()
`y#=camera position y()
`z#=camera position z()
position camera object position x(1),object position y(1)+10,object position z(1)
set camera to object orientation 5
move camera -50.5
position object 5,object position x(1),object position y(1),object position z(1)
set object to object orientation 5,1
`sc_sphereslide(3,x#,y#,z#,object position x(3),object position y(3),object position z(3),100,0)
`position camera sc_getcollisionslidex(),sc_getcollisionslidey(),sc_getcollisionslidez()
position object 4,camera position x(),camera position y(),camera position z()
while phy get collision data()
if phy get collision object a()=1 or phy get collision object b()=1
if upkey()=1 then phy add rigid body local force 1,0,0,1300,1
if downkey()=1 then phy add rigid body local force 1,0,0,-1300,1
endif
endwhile
if inkey$()="," then phy set rigid body angular velocity 1,-1.0,0,0
if inkey$()="." then phy set rigid body angular velocity 1,1.0,0,0
if leftkey()=1 then phy set rigid body angular velocity 1,0,-0.3,0
if rightkey()=1 then phy set rigid body angular velocity 1,0,0.3,0
`if leftkey()=0 and rightkey()=0 and inkey$()="" then phy set rigid body angular velocity 1,0,0,0
if spacekey()=1 then phy add rigid body local force 1,0,0,3000,1
phy update
if escapekey()=1 then exit
sync
loop
set window title "Shutdown"
phy clear
phy end
delete objects 1,2
end
delete memblock 0
"


P.S Sorry, but I don't have a server and any file I care to name from this project is too big for the uploader applet, but anyway all it needs really are two basic objects, some terrain and a small position change at line 23.

<?>

Login to post a reply

Server time is: 2024-11-24 14:54:20
Your offset time is: 2024-11-24 14:54:20