Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, juanex, Grant), 1,018 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Finding point of impact with c_move/rotate #293227
10/10/09 00:17
10/10/09 00:17
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
And once again I'm stumped.......

I'm trying to get a physics system working using c_move and c_rotate and whatnot. So far it's been very successful, but in order to make it work as I want, I need to know where two objects collide.

Comparing position coordinates basically works for entity-to-entity collisions, but I also need to know the angle of impact, plus this does not work for collisions with blocks.

Does 3DGS come with any way to determine point of impact (for c_move, not the inbuilt physics engine), do I need to write the code myself, or am I screwed, with the only alternative being using a real physics engine?

Thanks in advance for an answer!

Re: Finding point of impact with c_move/rotate [Re: MatAllum] #293232
10/10/09 00:48
10/10/09 00:48
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
Hello!

Probably the target vector is what you are searching for:
Originally Posted By: Manual about c_move
Modifies:
(...)
target - Position of the collision contact.


Re: Finding point of impact with c_move/rotate [Re: Saturnus] #293237
10/10/09 01:13
10/10/09 01:13
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Look at the "Modifies:" section of the c_move page in he manual.
That tells you what information is available after a c_move.
Its got
target == the x,y,z co-ordinate of collision (both poly and b-box collisions).
bounce == the direction vector the ME object would/has bounced into.
normal == the angle of the face of the polyon that was collided with.
etc....


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Finding point of impact with c_move/rotate [Re: EvilSOB] #293294
10/10/09 14:46
10/10/09 14:46
Joined: Jan 2005
Posts: 330
USA
M
MatAllum Offline OP
Senior Member
MatAllum  Offline OP
Senior Member
M

Joined: Jan 2005
Posts: 330
USA
Hmmm.... My manual (home page says "Version 6.1") doesn't mention the target vector.

Quote:
Modifies:
my_speed - covered distance and direction.
normal - Normal vector of hit polygon.
bounce - Bounce vector of hit polygon.
in_passable - 1 if the motion ends in a passable block.
in_solid - 1 if the movement ends in a non passable block.
event_type - set to type of event.


But I'll give that a try. Thanks for the help!

Re: Finding point of impact with c_move/rotate [Re: MatAllum] #293334
10/10/09 18:50
10/10/09 18:50
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Sounds like your using the old A6, rather than A7 c-script as I assumed...

Maybe its too new for you....

If so, sorry, but I cant help, I only know A7....


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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