Rick Posted September 13, 2014 Posted September 13, 2014 I have some csg as floors. Their collision type is set to Scene. I have some csg acting as triggers as well. I have a top down diablo style camera where I left click to move the character to a point. The issue is sometimes the camera angle has me clicking on a trigger and not the floor resulting in the player not moving to the floor position (but the trigger is invisible so the player would wonder what is going on). To remedy this I added Collision.Scene to the camera:Pick() as the collisiontype parameter, thinking that now it would only pick the csg floor (since it's set to Scene for a collision type) and skip the triggers. However when doing this I can't move at all now. How is my thinking wrong with this? if self.camera:Pick(mpos.x, mpos.y, pickinfo, .1, true, Collision.Scene) then Quote
AggrorJorn Posted September 13, 2014 Posted September 13, 2014 If you set it to that Scene, it will return all types that collide with scene. With character collisions it is better to use hitboxes. from the docs: collisiontype: if specified, the entity collision type will be tested against this, and only colliding entities will be tested. Quote
Rick Posted September 13, 2014 Author Posted September 13, 2014 I'm confused. This is mouse picking not character collision with hitboxes or anything. It's like an RTS where you click to move the character. [edit] Oh I get it. This is like giving the ray a collision type and then the regular collisions will happen between the ray collision type and whatever that would collide with normally. Quote
AggrorJorn Posted September 13, 2014 Posted September 13, 2014 When you fill in Collision.Scene, the pick will only work on objects that collide with Collision.Scene and not objects that are of Collision.Scene. At least that is my current understanding. Quote
Rick Posted September 13, 2014 Author Posted September 13, 2014 Collision.LineOfSight worked perfectly for this. Thanks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.