Rick Posted June 4, 2013 Share Posted June 4, 2013 How can I register only specific collisions to be calling my collision hook? Right now it's calling every frame which I'm guessing is because of the player colliding with the floor. However, I only say want to register a hook for when the player entity collides with props. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 4, 2013 Share Posted June 4, 2013 You can check the collision type of the collided entity in your callback. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted June 4, 2013 Author Share Posted June 4, 2013 Yeah, that's what I'm doing. Was just hoping it could be before that because that's making a lot of unneeded calls with colliding against the floor :/ Quote Link to comment Share on other sites More sharing options...
Rick Posted June 4, 2013 Author Share Posted June 4, 2013 Also is there a way to debug physics in game? I have this gun model and I did a Box shape to fit it and set it's type to Prop but when I run into it with my player it doesn't seem to trigger a collision. I also noticed if I give it a mass it seems to fall through the floor, which I wouldn't think it would do with the box shape. [edit] Actually this is acting strange. If I move it up high off the floor it collides but not how it should. It's like the shape is way under the model because the model floats on the ground. When it fell it acted like it hit the ground and bounced around some but the model was still in the air. When I turn on physics in editor the box looks to be around the model. Also without swept collision checked it would fall through the floor. [edit2] You know I scaled this model way down. I wonder if that has anything to do with it. This has to be what it is. I don't think Fit Shape considers the scale maybe? The shape size it has is 2, 10, 30 and there is no way this gun model is that big after I scaled it down, but it was really big before the scale. Strangely enough the show physics shows the shape much smaller than the shape size lets on. Quote Link to comment Share on other sites More sharing options...
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.