Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Aligning an entity to a surface #319898
04/18/10 18:03
04/18/10 18:03
Joined: Oct 2007
Posts: 306
Austria
A
Alan Offline OP
Senior Member
Alan  Offline OP
Senior Member
A

Joined: Oct 2007
Posts: 306
Austria
Hi there,

I'm currently working on some movement code (again :P) and I have encountered a problem I'm currently unable to solve.

Let's assume we have a stunt bike and it can go fast enough to go up walls and even do loopings.
Well, here's my question: how do I (instantly!) align the model to the normal of the surface underneath? I have found a code fragment somewhere here in the fourm a while ago, but it only allows to modify the angle *gradually*, it needs some frames until the model is fully aligned, which looks quite odd and eventually causes errors in movement every now and then.


Can you help me out?


Thanks in advance,


Alan

Re: Aligning an entity to a surface [Re: Alan] #319903
04/18/10 18:23
04/18/10 18:23
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
The code you found. You can change a variable (i think it was default: 1) to another value. This should increase the speed how the angle changes.

I hop i´m right with that. Try it out laugh

Re: Aligning an entity to a surface [Re: Rasch] #319917
04/18/10 19:37
04/18/10 19:37
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
yes you´re right, but the default value was 0.1, you could change it to 0.2 or 0.4.
just try it out.

...or you could use the physic engine.


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Aligning an entity to a surface [Re: alibaba] #320036
04/19/10 13:57
04/19/10 13:57
Joined: Oct 2007
Posts: 306
Austria
A
Alan Offline OP
Senior Member
Alan  Offline OP
Senior Member
A

Joined: Oct 2007
Posts: 306
Austria
Hi,

I played around a little with that value. A factor of 100 works quite good for me, but I'll need to refine some other parts of the movement code to make it work the way I want.

@Alibaba: The physics engine, you say? I know that 3DGS *has* one, but I never used it so far. Do you know any good place to get started with the physics engine? A beginner's tutorial maybe?


Greets,


Alan

Re: Aligning an entity to a surface [Re: Alan] #320039
04/19/10 14:05
04/19/10 14:05
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
The Workshop 19 has included a physic Tutorial

Re: Aligning an entity to a surface [Re: Widi] #320106
04/19/10 18:08
04/19/10 18:08
Joined: Oct 2007
Posts: 306
Austria
A
Alan Offline OP
Senior Member
Alan  Offline OP
Senior Member
A

Joined: Oct 2007
Posts: 306
Austria
Thx, I'll check it out!


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