About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
can i make one way collusion?
Author Message
mizukami Offline
Member

Post: #1
can i make one way collusion?
In Object editor.
i want to make one-way traffic, in our game.
i think, if "single-sided collusion (or something like)" is possible, can do so.

example:

make a transparence surface (square polygon or model).
and set properties below (if i can).

faces Front-side... no collusion.
faces Back-side... collusion valid.

and locate it on the game-field.

Can EE do this way?
05-20-2016 08:43 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Bronze Supporter

Post: #2
RE: can i make one way collusion?
well you can do plane actor ?

Mems<Actor> Planes;
int x = 1; // number of plane
Planes.setNum(x);
Planes[x].create(Plane(Vec(pos()), Vec( 1, 0, 0))).group(AG_GRP);

is that what you are asking ?
05-20-2016 09:56 AM
Find all posts by this user Quote this message in a reply
mizukami Offline
Member

Post: #3
RE: can i make one way collusion?
Thank you your answer.

(05-20-2016 09:56 AM)RedcrowProd Wrote:  well you can do plane actor ?

Mems<Actor> Planes;
int x = 1; // number of plane
Planes.setNum(x);
Planes[x].create(Plane(Vec(pos()), Vec( 1, 0, 0))).group(AG_GRP);

is that what you are asking ?

it defines

1. Position
2. Normal vector
3. Collusion group

How to set collusion size/area?
Please teach me.

Or, it cannot set one-way collusion on EE's UI?
if so, to take up programmer's time. it should be manage map designer, i think.
05-20-2016 10:34 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: can i make one way collusion?
Hi,

You can make different kinds of Physical Bodies in the Object Editor:
http://www.esenthel.com/?id=doc#Physical_Body

I'm not sure if I understand what would you like to achieve.

If you make a triangle-mesh based actor, then any other object in contact with those triangles, will get pushed away to the outside of the mesh.

I'm not aware of any option to change back/front face collision to work differently in PhysX.
05-22-2016 08:49 AM
Find all posts by this user Quote this message in a reply
mizukami Offline
Member

Post: #5
RE: can i make one way collusion?
i want to do like below.
(example) in dungeon, it make one direction passage.

EE-editor cannot? only programs can do?


Attached File(s) Image(s)
   
(This post was last modified: 05-23-2016 02:24 AM by mizukami.)
05-23-2016 02:23 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: can i make one way collusion?
Hi,

I don't think PhysX allows something like that.

You'd have to think of a custom solution, for example:
-place a Box Actor obstacle (the wall)
-then detect in codes on which side of the box is the player
based on the information, call:
Code:
Actor::ignore(Actor &actor, Bool ignore=true) ; // ignore collisions with 'actor' actor
for the Box Actor and Player Actor Controller Actor as the parameter
bool ignore_collision=(side==inside);
box.ignore(player.ctrl.actor, ignore_collision);

with this you can disable collisions if player is already inside.
05-23-2016 02:55 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #7
RE: can i make one way collusion?
Actually, if I remember correctly this is what you can use static mesh physics for,
if you take a box, cut away the backside of the box, create a static physics mesh for it, you can now run through it from one side but not the other(could be some issues that when you've passed the object you get pushed as collision is enabled on the other side).

Would look like it does below.


Attached File(s) Image(s)
       
(This post was last modified: 05-23-2016 04:51 AM by Zervox.)
05-23-2016 04:48 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: can i make one way collusion?
Yes,
This can be used instead of a Box Actor,
however Actor.ignore would need to be called just the same.
05-23-2016 05:42 AM
Find all posts by this user Quote this message in a reply
Post Reply