Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 559 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Wheel Constraint Problem #15792
06/10/03 23:18
06/10/03 23:18
Joined: Jul 2000
Posts: 2,037
Lafayette, LA USA
J
James Snydstrup Offline OP
Senior Expert
James Snydstrup  Offline OP
Senior Expert
J

Joined: Jul 2000
Posts: 2,037
Lafayette, LA USA
Can anyone get parameter5 to work on a wheel constraint?

No matter how I try to limit the wheel rotation about axis2 using parameter5 the wheel can always make a full rotation when motorized.

Re: Wheel Constraint Problem #15793
06/10/03 23:46
06/10/03 23:46
Joined: Apr 2003
Posts: 111
france
seb_dup1 Offline
Member
seb_dup1  Offline
Member

Joined: Apr 2003
Posts: 111
france
you can't use parameter5 in ph_Wheel ;it stay always nullvector.

Re: Wheel Constraint Problem #15794
06/10/03 23:58
06/10/03 23:58
Joined: Jul 2000
Posts: 2,037
Lafayette, LA USA
J
James Snydstrup Offline OP
Senior Expert
James Snydstrup  Offline OP
Senior Expert
J

Joined: Jul 2000
Posts: 2,037
Lafayette, LA USA
I am beginning to find this physics engine very limiting. [Frown]

Why can't I set limits on both axis' of rotation of a wheel constraint?

Why can't I limit the rotation of an entity along the slider axis of a slider contraint? I just want it to slide not rotate.

Why can't I limit the rotation of a ball constraint around any of the axis'?

My path down frustration lane started with trying to make a brake for my vehicle wheels. The simple solution would be to just motor the wheels to 0 angular velocity with a high torque. However, on a steep slope the vehicle will still roll down hill with the brakes applied. This is due to the fact that contraints are allowed to shift out of their proper positions. I can fix that by adjusting the values of CFM or ERP but if I do that my brakes work but then my physics objects tend to randomly 'explode' and, of course, all the joints are too stiff.

No brakes yet...but I would appreciate if someone could give help out with some code that would generate a +1 or -1 to indicate whether a wheel is rotating clockwise or counterclockwise.

Re: Wheel Constraint Problem #15795
06/11/03 03:40
06/11/03 03:40

A
Anonymous
Unregistered
Anonymous
Unregistered
A



quote:
Originally posted by James Snydstrup:
No brakes yet...but I would appreciate if someone could give help out with some code that would generate a +1 or -1 to indicate whether a wheel is rotating clockwise or counterclockwise.

How about sampling the wheel's tilt value at two consecutive frames and then pick the smaller angle difference to yield direction of movement?
E.g. if tilt1==10 and tilt2==60 then it could be a forward movement of 50 degrees or a backward movement of -310. Given low velocities and high framerate, the result should be the smaller one, i.e. 50 and thus it's moving forward.

As for constraint parameters (2nd axis limits, non-rotating slider, ball limits), I am sorry to tell you that there are no enhancements planned in the near future. One thing that's on my list is making the wheels more stable though.

Re: Wheel Constraint Problem #15796
06/11/03 03:42
06/11/03 03:42
Joined: Jul 2000
Posts: 2,037
Lafayette, LA USA
J
James Snydstrup Offline OP
Senior Expert
James Snydstrup  Offline OP
Senior Expert
J

Joined: Jul 2000
Posts: 2,037
Lafayette, LA USA
quote:
No brakes yet...but I would appreciate if someone could give help out with some code that would generate a +1 or -1 to indicate whether a wheel is rotating clockwise or counterclockwise.
Ok, got this one figured out. I used Ventilators script to get the local linear velocity and then normalized it to length 1. The trick is I had to rotate to the 'chassis' angles and not the 'wheel' angles. The wheel angles don't help since the wheels are always rolling along..doh! Wheel linear velocity rotated to chassis angles using...

code:
phent_getvelocity(wheel,vel,nullvector);
vec_rotate(vel,vector(-chassis.pan,-chassis.tilt,-chassis.roll));
vec_normalize (vel, 1);

quote:
One thing that's on my list is making the wheels more stable though.
More stable wheels would be nice. [Smile]

FYI: Parameter5 is documented in the manual for wheel axis2 so you might want to change the documentation.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1