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
0 registered members (), 1,397 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Finding the angle of a wall #12927
06/18/03 03:05
06/18/03 03:05
Joined: May 2002
Posts: 82
thrasher4556 Offline OP
Junior Member
thrasher4556  Offline OP
Junior Member

Joined: May 2002
Posts: 82
How do I find out the angle of a wall or block? Like if my car is riding up hill and I want the car to tilt back or if one of the computer players is next to a wall I want his pan to be parallel to the wall. How do i do this?

Re: Finding the angle of a wall #12928
06/18/03 03:55
06/18/03 03:55
Joined: Sep 2002
Posts: 903
Karlsruhe
TAcker Offline
Developer
TAcker  Offline
Developer

Joined: Sep 2002
Posts: 903
Karlsruhe
code:
EVENT_BLOCK
entity.ENABLE_BLOCK
NORMAL - Vektor der getroffenen Normale
BOUNCE - Vektor in Abprallrichtung

read the english manual in this case.

Re: Finding the angle of a wall #12929
06/18/03 04:23
06/18/03 04:23
Joined: May 2002
Posts: 82
thrasher4556 Offline OP
Junior Member
thrasher4556  Offline OP
Junior Member

Joined: May 2002
Posts: 82
what is it listed under in the manual??

Re: Finding the angle of a wall #12930
06/18/03 09:04
06/18/03 09:04
Joined: Sep 2001
Posts: 237
Maine, USA
J
Jason Bryant Offline
Member
Jason Bryant  Offline
Member
J

Joined: Sep 2001
Posts: 237
Maine, USA
Check out trace in the manual. That should help.

Jason

Re: Finding the angle of a wall #12931
06/18/03 18:43
06/18/03 18:43
Joined: Sep 2002
Posts: 903
Karlsruhe
TAcker Offline
Developer
TAcker  Offline
Developer

Joined: Sep 2002
Posts: 903
Karlsruhe
You have to work with NORMAL.
Get Normal by using TRACE or in the moment of a collision with a block.

the code is:
vec_to_angle(my.pan,normal.pan)

Re: Finding the angle of a wall #12932
06/19/03 13:02
06/19/03 13:02
Joined: May 2002
Posts: 82
thrasher4556 Offline OP
Junior Member
thrasher4556  Offline OP
Junior Member

Joined: May 2002
Posts: 82
Can someone explane normal to me: what it is what it does? Because I have been trying to understand it from the manual but it is not making any sence.

Re: Finding the angle of a wall #12933
06/19/03 21:17
06/19/03 21:17
Joined: Sep 2001
Posts: 237
Maine, USA
J
Jason Bryant Offline
Member
Jason Bryant  Offline
Member
J

Joined: Sep 2001
Posts: 237
Maine, USA
A surface normal is a vector of length 1 perpendicular to that surface.

Jason

Re: Finding the angle of a wall #12934
06/19/03 22:48
06/19/03 22:48
Joined: May 2002
Posts: 82
thrasher4556 Offline OP
Junior Member
thrasher4556  Offline OP
Junior Member

Joined: May 2002
Posts: 82
i know thats what it said in the manual but does that mean thta the vector holds the angle of the object that the trace event hit? Can you give me an example of what the normal would hold?

Re: Finding the angle of a wall #12935
06/19/03 23:31
06/19/03 23:31
Joined: Sep 2001
Posts: 237
Maine, USA
J
Jason Bryant Offline
Member
Jason Bryant  Offline
Member
J

Joined: Sep 2001
Posts: 237
Maine, USA
Example: If you send a trace toward the ground and the ground is flat (parallel with x and y axes) The normal from the trace would be the vector (0,0,1)... You can use the vec_to_angle command to compute the tilt and pan angles from the normal vector. This is my understanding... Please correct me if this is wrong.

Jason

Re: Finding the angle of a wall #12936
06/19/03 23:43
06/19/03 23:43
Joined: Sep 2002
Posts: 903
Karlsruhe
TAcker Offline
Developer
TAcker  Offline
Developer

Joined: Sep 2002
Posts: 903
Karlsruhe
create an objekt with the MDLeditor.
OPTIONS -> SHOW NORMALS -> ALL
Look at the objekts triangles. On this faces are blue/white lines, which
are "standing" on an triangle. This lines are called "normals"

Page 1 of 2 1 2

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