© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
25 replies
v14do

Global Variables - Unity

So im currently making a game in unity and i wanna have a gravity tile that basically gives you velocity, depending on the tile itself - either upwards velocity or downwards velocity. I kinda did it but i cant set a different velocity for the different tiles. For example i set a velocity of 2 on the up tiles and -2 on the down tiles, but it registers the velocity as 2 and both tiles act as up tiles. I've attached pictures to hopefully clear up my problem!
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Unity property unityaction invoke
C#CC# / help
3y ago
Using global variables
C#CC# / help
3y ago