Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Help! Relative rotation! #159380
10/07/07 11:59
10/07/07 11:59
Joined: Oct 2007
Posts: 116
S
sydan Offline OP
Member
sydan  Offline OP
Member
S

Joined: Oct 2007
Posts: 116
Ok, Ive had 3dgs for 6 months and Im already quite good at all aspects of game creation and I have lots of coding experience. However I tried to make space basedgame and found that I have hit a serious problem. THe ship rotates around the x,y,z axis and I really don't want this in a space game where there is no up and down. I have tried alot of different tactics to try and remove 3dgs's euler rotaion but I can't. I have tried to use add_ang and add_rot (or what ever its called) but i don't understand them and the manual really doesn't help. I can't find any good articles on the internet that can help so I thought I sign tothis forum and get help. I need some one to explain add_ang to me because its really confusing. I can grasp most other concepts but this I don't get. And whats more is that I have found that I need non euler rotation some where in practically all my games!!! help!

Re: Help! Relative rotation! [Re: sydan] #159381
10/07/07 12:05
10/07/07 12:05
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
use: c_rotate with the use_axisr flag

Re: Help! Relative rotation! [Re: Xarthor] #159382
10/07/07 12:07
10/07/07 12:07
Joined: Oct 2007
Posts: 116
S
sydan Offline OP
Member
sydan  Offline OP
Member
S

Joined: Oct 2007
Posts: 116
How do they work in script?


For some reason, my ambition always seems to beat my ability.
Re: Help! Relative rotation! [Re: Xarthor] #159383
10/07/07 12:08
10/07/07 12:08
Joined: Oct 2007
Posts: 116
S
sydan Offline OP
Member
sydan  Offline OP
Member
S

Joined: Oct 2007
Posts: 116
Sorry Im new that was supposed to be a reply, yeah how do they work in script.

Re: Help! Relative rotation! [Re: sydan] #159384
10/07/07 12:14
10/07/07 12:14
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Did you even take a look at the site I linked to?

Quote:


c_rotate(ENTITY* entity, ANGLE* angle, var mode)





entity in this case is a pointer to your player entity (space ship thing)

angle* is a vector which will be used for the 3 angle directions: pan,tilt,roll

var mode: this is where you put the "use_axisr"

And you put this into your player entity action.
Example:
Use mouse_force.y for rotating the tilt of the entity:
Code:

action player_act
{
player = me;
while(me)
{
c_rotate(my,vector(0,5*mouse_force.y*time_step,0),use_axisr);
wait(1);
}
}



Re: Help! Relative rotation! [Re: Xarthor] #159385
10/07/07 12:17
10/07/07 12:17
Joined: Oct 2007
Posts: 116
S
sydan Offline OP
Member
sydan  Offline OP
Member
S

Joined: Oct 2007
Posts: 116
Yep I did look at the link Ive used that part of the manual before but it doen;t work for me. The ship stretches across the screen and turns very randomly.

Re: Help! Relative rotation! [Re: sydan] #159386
10/07/07 12:23
10/07/07 12:23
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
What edition and version of 3DGS do you have?
How to find out:
- Open Wed
- Go to Help -> About WED...
- A little box will open with all the details about your edition/version

Did you try the little snippet I posted?
And I mean just that little snippet, comment every other code that might rotate the ship.


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