Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 10:32
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
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 604 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
prevent c_move call in c_rotate? #121280
04/03/07 20:43
04/03/07 20:43
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
I am using c_rotate to rotate a model entity with collision detection. By default, c_rotate will use c_move to move the entity away from the obstacle after a collision occurs. (I have set move_friction=1 to prevent gliding)
I want to stop the c_move call or prevent movement (translational) another way, so that the user is forced to use only rotation to avoid the obstacle. How can this be done? Thanks!

Re: prevent c_move call in c_rotate? [Re: yorisimo] #121281
04/03/07 22:20
04/03/07 22:20
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
When I've used c_rotate(), it simply stopped rotating upon collision, it didn't push itself away...


xXxGuitar511
- Programmer
Re: prevent c_move call in c_rotate? [Re: xXxGuitar511] #121282
04/04/07 15:09
04/04/07 15:09
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
What mode did you use?

From 3DGS manual:
"c_rotate first attempts an in-place rotation by setting the desired angles. If this results in a collision then a glide vector similar to the one above is calculated and c_move is called to push the entity a certain distance away from the wall. Again a rotation is attempted. Should this one succeed then the entity is moved back towards its starting point. Otherwise another reflection is calculated and c_move gets called. In a worst case scenario c_rotate calls c_trace 5 times and c_move 4 times before giving up and returning the player to its starting position/orientation."

Re: prevent c_move call in c_rotate? [Re: yorisimo] #121283
04/04/07 15:21
04/04/07 15:21
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
well, I guess you could store the entity's position in a temp var, then use c_rotate(), and then reposition it with temp...

But this would result in an ugly and incorrect rotation.


xXxGuitar511
- Programmer

Moderated by  HeelX, Spirit 

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