Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, bigsmack, 1 invisible), 1,341 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Animated suspension #65397
03/02/06 17:31
03/02/06 17:31
Joined: Oct 2002
Posts: 254
UK, London
Dyc Offline OP
Member
Dyc  Offline OP
Member

Joined: Oct 2002
Posts: 254
UK, London
Hi,
I’m currently experimenting with animated vehicle suspension. I’m using the PH_WHEEL with another PH_SLIDER constraint on top of that. This is due to the lack of ability to query the ph_wheel constraints “spring damper” slider offset. (I hope this explanation makes sense)
I also tried tracing from the undercarriage to ground, but its not very accurate.
So if anyone has any other ideas I would appreciate any input. I already suggested adding to PHCON_GETPOSITION the ability to query the “spring damper” offset, but it may not be so easy to implement.

Re: Animated suspension [Re: Dyc] #65398
03/02/06 20:33
03/02/06 20:33
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
I was trying to use bones in the suspension to match them to the wheel centers, but I can't seem to query this accuratly. Are you saying that the suspension poistion is not queriable? in other words it returns the position of the wheel, before any suspension changes?

Seems like we are both heading in the same direction


The Art of Conversation is dead : Discuss
Re: Animated suspension [Re: indiGLOW] #65399
03/02/06 20:41
03/02/06 20:41
Joined: Oct 2002
Posts: 254
UK, London
Dyc Offline OP
Member
Dyc  Offline OP
Member

Joined: Oct 2002
Posts: 254
UK, London
From manual:
Entities are allowed to rotate around axis 1 and axis 2. Use this constraint for setting up wheel-like behaviour instead of using two separate PH_HINGEs. For a car, axis 1 is the steering axis (left/right), while axis 2 is required for forward/backward movement. Only axis 1 can have angle limits and can have its orientation queried (phcon_getposition).

I think this means that you can only query the angle offset of the ph_wheel and not the "shock absorber" slider.

Re: Animated suspension [Re: Dyc] #65400
03/02/06 21:22
03/02/06 21:22
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Dyc, your observations are correct. Unfortunately PH_WHEEL can not report its current position along axis 2. However, your trace approach should work. Or you could use getvertex for the center of the wheel and the center of the wheel mount and calculate the difference.

Re: Animated suspension [Re: Marco_Grubert] #65401
03/02/06 22:23
03/02/06 22:23
Joined: Oct 2002
Posts: 254
UK, London
Dyc Offline OP
Member
Dyc  Offline OP
Member

Joined: Oct 2002
Posts: 254
UK, London
"Or you could use getvertex for the center of the wheel and the center of the wheel mount and calculate the difference"

Thanks Marco it's working nicely. But keeping in mind that you need to place the wheel mount vertex on the chasis and not on the animated part of the suspention.

Re: Animated suspension [Re: Dyc] #65402
03/03/06 09:37
03/03/06 09:37
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
I have done this with bones in the chasis suspension, have you done the same Dyc?

Works really well, thanks Marco


The Art of Conversation is dead : Discuss
Re: Animated suspension [Re: indiGLOW] #65403
03/03/06 11:38
03/03/06 11:38
Joined: Oct 2002
Posts: 254
UK, London
Dyc Offline OP
Member
Dyc  Offline OP
Member

Joined: Oct 2002
Posts: 254
UK, London
Yeah pretty much, I got the wheel centre vertex and the vertex that I used for wheel attachment and measured the distance the wheel travels in the y direction. Did some more calculations on the result to convert it to the 0-100 range and used that to animate the suspension.

Re: Animated suspension [Re: Dyc] #65404
03/03/06 19:18
03/03/06 19:18
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Just for info: I have added 4 bones to each suspension strut, and assigned the vertex's from around the lower part of the suspension...



Then in script I get the position of the wheels center vertex and move the appropriate bones to match. Seems like a simpler way to do it, but both methods work. Just wanted to share with you how I am doing it


The Art of Conversation is dead : Discuss
Re: Animated suspension [Re: indiGLOW] #65405
03/03/06 20:35
03/03/06 20:35
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Nice !

Re: Animated suspension [Re: Marco_Grubert] #65406
03/03/06 20:37
03/03/06 20:37
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Marco, I have uploaded a demo of the car in motion if it is of any use to you. Download Here


The Art of Conversation is dead : Discuss

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