Hey ! I want my Enemy to be able to move towards an object and hold it so that he can use it. So for example the enemy moves towards a gun thats already in the scene and when it collides with the Gun he can use it.
I’m not sure how to go about this I’m thinking when the enemy collides with the object the object becomes a parent or child of the enemy and then the enemy can now use it.
And if i what i proposed is right as a solution i’m not sure how to code it. Any ideas or Help with how to tackle this?
All of what you have proposed should work, so what part of this are you in doubt about?
– Dracoratjust the coding aspect of it really
– Charles_GamsHere's a good place to start: http://answers.unity3d.com/questions/311844/picking-up-objects-within-range.html Instead of on mouse click though, you'll just do it on collision. Also, there are some tutorials on the site if you need some help on how to move an enemy to a target location.
– DracoratAlright thanks Ill check that out do you think its alright to check collision using the oncontrollercolliderhit function of the character controller or should i check collision with another collider
– Charles_Gams