Wednesday, October 19, 2022
HomeGame Developmentunity - World house inspector place not matching rework.place

unity – World house inspector place not matching rework.place


I’ve seen questions like this that normally find yourself with the OP having confused localposition and world place. This isn’t the case.

My enemy is animated. He holds a gun. This gun has a toddler, referred to as “shootpoint” which is the place the bullet comes from.

When firing, I instantiate a empty gameobject at this shootpoint. Utilizing the shootpoint’s rework.place. The enemy is stood on the bottom, so the shootpoint place is fairly low.

Right here is the code that I’m utilizing to instantiate this.

GameObject g = new GameObject();

g.rework.place = bulletSpawnPoint.place;

This object (and the weapon’s bullets) seem very excessive up. Far-off from the place. Hooked up is a picture, displaying the purpose that the bullets (and the gameobject) are coming from. Chosen, is the place they need to be coming from. They’re instantiated in world house, utilizing its rework.place.
Here’s a picture.

Unity is bugged. I don’t know what to do now. How would I even repair this? May or not it’s the animator? Why does not it line up?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments