Gamestudio Links
Zorro Links
Newest Posts
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (LucasJoshua, Grant, EvanTJ, EW_bytes, 1 invisible), 35,876 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Scaling a model between two points ... #245072
01/08/09 09:51
01/08/09 09:51
Joined: Apr 2008
Posts: 31
C
Chrisu Offline OP
Newbie
Chrisu  Offline OP
Newbie
C

Joined: Apr 2008
Posts: 31
How can I scale (and position) a model in relation of two other objects in the 3d world? I need that for the "visual management" of the springs and dampers of a car.

Thx in advance.

Re: Scaling a model between two points ... [Re: Chrisu] #245073
01/08/09 09:55
01/08/09 09:55
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Explain more??

Re: Scaling a model between two points ... [Re: Cowabanga] #245075
01/08/09 09:59
01/08/09 09:59
Joined: Apr 2008
Posts: 31
C
Chrisu Offline OP
Newbie
Chrisu  Offline OP
Newbie
C

Joined: Apr 2008
Posts: 31
@cowabanga: I have a 3d-model which is a spring. This I want to position between a wheel of my car and the body of my car dynamically because the distance between is of course varying.

Re: Scaling a model between two points ... [Re: Chrisu] #245078
01/08/09 10:06
01/08/09 10:06
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
vec_for_vertex
vec_set
my.scale_x,y,z

first calculate 2 positions you want your spring to be attached using vec_for_vertex on car.

then vec_set your springs position to lower one.

usin vec_sub, calculate the vector that points from you one point to other. use vec_to_angle. this will give you the angles which you spring should use.

then using ve_length calculate the lenght of thet vector and scale you entity accordingly.


3333333333
Re: Scaling a model between two points ... [Re: Quad] #245080
01/08/09 10:11
01/08/09 10:11
Joined: Apr 2008
Posts: 31
C
Chrisu Offline OP
Newbie
Chrisu  Offline OP
Newbie
C

Joined: Apr 2008
Posts: 31
Sounds logical but also complicated. I was hoping of any functionality in the engine (not physics) that keeps objects connected to others.


Moderated by  HeelX, Spirit 

Gamestudio download | 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