Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

what does "static" ,"quaternion.euler," and "instantiate" do? how can i use them to my advantage?

this is unity c sharp

(+2)

Staticbodies don't move (use them for platforms), quaternion.euler rotates the object, instantiate duplicates an object (you can use them for bullets or spawning enemies). I'm not a pro but I know the answer for you so...

(+1)

This ^ is a great description!

I will add that "object.instantiate" has several options that you can specify: position, rotation, parent. If you only set a parent parameter - without setting position/rotation - you can also set "instantiateInWorldSpace" to "true" to set the object relative to "world space" or set "false" to set the object relative to the parent's position.

Also, know that when setting Quaternion.Euler you can either pass a Vector3 object or the individual coordinates (x, y, z).

[Unless, of course, Unity decides to randomly change their fundamental features in a future update for absolutely no reason...again.]

If you are using Unity for this jam, my #1 advice is to pick a version and stick with it. Don't update even if they release a new version during the jam. (Updating an out-of-house engine mid-project has cost many studios a lot of lost time - sometimes days, sometimes a week or two; but I have known projects that lost months to this!)

thanks! Both of you!

'static' can also describe a class that has only one instance and you can't make instances of it. It can be used to make singletons to store variables.

noice thanks for the description

Yup! I've gotten so used to people asking about static bodies that I didn't even think to mention static classes or variables!