Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Newbie Questions
by AndrewAMD. 12/04/23 11:14
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
2 registered members (TipmyPip, izorro), 556 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Rotate an object #136733
06/16/07 20:25
06/16/07 20:25
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
Oh no, I don't want to just rotate an object, that would be to easy

I want that an object rotate correctly (a ball for example) in dependance of it's current movement. I've tried a lot but I've never get it.

Here's my current code:

vec_set(last_pos,my.x);
wait(1);
my.tilt-=(my.x-last_pos.x)*17*cos(my.pan);
my.pan+=(my.y-last_pos.y)*17*sin(my.roll);
my.roll+=(my.y-last_pos.y)*17*sin(my.tilt);

I hope you understand what I mean.

Regards
TSGames

Re: Rotate an object [Re: TSG_Torsten] #136734
06/16/07 20:28
06/16/07 20:28
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
try c_rotate with use_axisr mode mixing with c_move depends of pan,tilt,roll
I hope that's what you want to
if not... sorry for stupid answer

Last edited by tompo; 06/16/07 20:29.

Never say never.
Re: Rotate an object [Re: tompo] #136735
06/16/07 20:45
06/16/07 20:45
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
If you have comm and just need an object why dont you use the physics engine? Its a piece of cake and you can forget those complicated calculations..

Re: Rotate an object [Re: tompo] #136736
06/16/07 20:47
06/16/07 20:47
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
No, sorry, I don't use c_move. And I don't want to use c_move.
A object is set to a position given throug variables. 1 second later the variables arlready had change and the entity had get a new position. Now it should rotate as realisitc as possible, depending on the movement speed and direction.

Re: Rotate an object [Re: TSG_Torsten] #136737
06/16/07 20:48
06/16/07 20:48
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
@demiGod

It's multiplayer, the player use a physics object and send the current physics position to the server and the server has to calculate the rotation. So it use less bandwith.

Last edited by TSGames; 06/16/07 22:43.
Re: Rotate an object [Re: TSG_Torsten] #136738
06/23/07 20:45
06/23/07 20:45
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
No one has an idea?

Or do you just haven't understand?

Regards
TSGames

Re: Rotate an object [Re: TSG_Torsten] #136739
06/23/07 20:49
06/23/07 20:49
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Couldn´t you just send the forces and use the physicsengine at each client?

Re: Rotate an object [Re: Slin] #136740
06/23/07 20:53
06/23/07 20:53
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
This wouldn't work, the physics engine doesn't work equally.

Regards
TSGames

Re: Rotate an object [Re: TSG_Torsten] #136741
06/25/07 07:34
06/25/07 07:34
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Maybe resort to directional animations? as each move is called, so is the required animation.

Re: Rotate an object [Re: Nems] #136742
06/25/07 07:59
06/25/07 07:59
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
quaternions. are u using lite-c or c-script?

julz


Formerly known as JulzMighty.
I made KarBOOM!
Page 1 of 2 1 2

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