Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
locked to world + rotation? #327101
06/04/10 15:32
06/04/10 15:32
Joined: Apr 2010
Posts: 47
D
Darkmatters Offline OP
Newbie
Darkmatters  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 47
Hi all again,

I want to lock an object to the world, and use the following code...

{vec_set(obj_mdl.x,vector(x,y,z));vec_set(obj_mdl.pan,tubey.pan); vec_for_ent(obj_mdl.x,tubey);}

Which works fine.... but I also want to rotate it, with the following line, ot the obj rotates and turns with the world.

vec_add(obj_mdl.pan,vector(x,0,0));

Whic does NOT work....probably because the parameters are holding it in position??
So.... any ideas? apart from animation???


As usual, thanks in advance....
D.

Re: locked to world + rotation? [Re: Darkmatters] #327191
06/04/10 23:52
06/04/10 23:52
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

If you are trying to have the object rotate with the world
so that it appears not to move you have to
make the object follow the movement of the world

so (not code)
vec_set ( your object, world pan or position....)


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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