Jump to content

Camera picking collision type issue


Rick
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...