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
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 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
Page 2 of 2 1 2
Re: Roll without changing my.z ... [Re: JibbSmart] #367235
04/11/11 05:06
04/11/11 05:06
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
But its not possible to make c_move ignore one of the entity angle in the direction process?

Like if i go foward and i tilt my entity go in the direction givin by the tilt... but if i pan the entity ignore the pan angle for his direction, so it just turn on himself but continue to go in the same direction.

That's look so simple.. loll but im completly lost.

Re: Roll without changing my.z ... [Re: Altarius] #367236
04/11/11 05:09
04/11/11 05:09
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Dude, why don't you use absolute vector for movement, that will ignore roll?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Roll without changing my.z ... [Re: 3run] #367238
04/11/11 05:19
04/11/11 05:19
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Yes but i need to dont ignore PAN... so if use absolute vector that ignore all 3 angle.

Last edited by Altarius; 04/11/11 05:22.
Re: Roll without changing my.z ... [Re: Altarius] #367239
04/11/11 05:25
04/11/11 05:25
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Use absolute only to ignore ROLL. What kind of movement should this be?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Roll without changing my.z ... [Re: 3run] #367251
04/11/11 10:54
04/11/11 10:54
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Can u show me a short exemple of what u talking about plz.

Last edited by Altarius; 04/11/11 10:54.
Re: Roll without changing my.z ... [Re: Altarius] #367252
04/11/11 11:00
04/11/11 11:00
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Not sure if it helps, cause you didn't answer my question:
Code:
action hero()
{
	VECTOR dist;
	VECTOR absdist;
	while(1)
	{
		my.pan += 10 * (key_a - key_d) * time_step;
		my.roll += 10 * (key_d - key_a) * time_step;
		dist.x = 10 * (key_cuu - key_cud) * time_step;
		dist.y = 0; dist.z = 0;
		absdist.y = 10 * (key_cul - key_cur) * time_step;
		absdist.x = 0; absdist.z = 0;
		c_move(my,dist,absdist,IGNORE_PASSABLE|GLIDE);
		wait(1);
	}
}




Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Roll without changing my.z ... [Re: 3run] #367270
04/11/11 14:33
04/11/11 14:33
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
I told you how to do it. Did you try it?

If you want tilt to be used as well you just add in the tilt component:
Code:
c_move(my, nullvector, vec_rotate(speed, vector(my.pan, my.tilt, 0)), IGNORE_PASSABLE|GLIDE);



If you want to base it all on a different direction entirely (call it newDir, for example):
Code:
c_move(my, nullvector, vec_rotate(speed, newDir), IGNORE_PASSABLE|GLIDE);


newDir would be an ANGLE that points in the direction you want the entity to pretend it is facing when moving.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Roll without changing my.z ... [Re: JibbSmart] #367271
04/11/11 14:37
04/11/11 14:37
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Thank you Jibb, good combination of "vec_rotate" and "c_move", did know about that.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Roll without changing my.z ... [Re: 3run] #367285
04/11/11 15:05
04/11/11 15:05
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
To further elaborate on Jibb's post:

Code:
ANGLE* temp_ang;
VECTOR* speed;

// set the move direction and speed
vec_set( temp_ang, vector(my.pan,my.tilt,0) );
vec_set( speed, vector(10,0,0) );

c_move( my, nullvector, vec_rotate(speed,temp_ang), GLIDE );




Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Roll without changing my.z ... [Re: Redeemer] #367294
04/11/11 16:39
04/11/11 16:39
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Yea i got it! Thx a lot guys!

Page 2 of 2 1 2

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