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.

DLL Talk / Newton vehicle left and right turns are different

Author
Message
Claus Topholt
21
Years of Service
User Offline
Joined: 30th Nov 2002
Location: Denmark
Posted: 12th Oct 2005 18:05
I've noticed some strange vehicle behavior with Newton - in my own code, in the "demo 12 - Simple vehicle without media Tutorial" and in CarLab: Turning right is smooth and realistic, but turning left almost immediately spins the vehicle. It's as if the force is double or triple when turning left. Interestingly, the Newton SDK samples do not appear to have this issue.

Using WinXP, DirectX 9.0c, Newton 1.32 DBPRO wrapper and DBPro 5.8 with the editor upgrade.

Are anyone else seeing this - and even better, does anyone have an explanation?
Claus Topholt
21
Years of Service
User Offline
Joined: 30th Nov 2002
Location: Denmark
Posted: 14th Oct 2005 22:37
Well, serves me right for using snippets of other people's code.. The "demo 12 - Simple vehicle without media Tutorial" contains a bit of code to manually put a damper on rotations, which only works for positive values (in this case, turning right). When also taking into account negative values, turning left and right are now dampened equally, like shown below:
Claus Topholt
21
Years of Service
User Offline
Joined: 30th Nov 2002
Location: Denmark
Posted: 14th Oct 2005 23:50
Well, serves me right for using snippets of other people\'s code.. The \"demo 12 - Simple vehicle without media Tutorial\" contains a bit of code to manually put a damper on rotations, which only works for positive values (in this case, turning right). When also taking into account negative values, turning left and right are now dampened equally, like shown below:

NDB_NewtonBodyGetOmega CarBody
VecX#=NDB_GetVector_X(1)
VecY#=NDB_GetVector_Y(1)
VecZ#=NDB_GetVector_Z(1)
if VecX# >1 then VecX#=1
if VecY# >1 then VecY#=1
if VecZ# >1 then VecZ#=1
if VecX# <-1 then VecX#=-1
if VecY# <-1 then VecY#=-1
if VecZ# <-1 then VecZ#=-1
NDB_SetVector 1, VecX#, VecY#, VecZ#
NDB_NewtonBodySetOmega CarBody
Etienne
20
Years of Service
User Offline
Joined: 17th Jan 2004
Location: Paris
Posted: 23rd Oct 2005 04:30 Edited at: 23rd Oct 2005 04:30
Go check the newton forum directly , it's cool you posted here , but you will get more answers there http://walaber.proboards23.com/

edit : oh you already did .. now that's turning back at you , why posting twice .... errr ...

Let's go on with this .
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 26th Oct 2005 08:07
Quote: "why posting twice .... errr ...
"

two different forums...errrr...

I'll give you some toast
My BLOG really sucks...
Kjelle69
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: Sweden 150 km north of arctic circle
Posted: 29th Oct 2005 12:49
Thanks Claus !
I will update the simple vehicle code for the next release and also put in credits in your favour

-==The tame birds yearn, the wild ones dare to fly.==-
http://Mtec.hostname.nu
Claus Topholt
21
Years of Service
User Offline
Joined: 30th Nov 2002
Location: Denmark
Posted: 31st Oct 2005 21:57
Thanks Kjelle! The wrapper is awesome, I'm having way to much fun with it to ever get any work done :o)

Login to post a reply

Server time is: 2024-05-06 14:12:31
Your offset time is: 2024-05-06 14:12:31