Quantcast
Channel: Answers by "2d4Games"
Browsing all 24 articles
Browse latest View live

Answer by 2d4Games

I have figured out the problem! It turns out that the collider.bounds.center is a vector relative to the world origin (it goes from 0,0 in the world to the center of the character), while...

View Article



Answer by 2d4Games

At line 18 you're setting the timeStamp to be 2 seconds in the future, and at line 25 you're making the if statement not get triggered until those 2 seconds pass. From what I see, after you click, your...

View Article

Answer by 2d4Games

Add a check on the character that checks if the character is on that special platform or not. If the player is on the platform, then set the direction of the gravity to be towards the platform. You can...

View Article

Answer by 2d4Games

Inside a script file, you could make a setting that will change how the character movement is calculated. var gameType = 0; //0 for Parkour-Shooter //1 for Shooter-Sneak //2 for Sneak-Parkour switch...

View Article

Answer by 2d4Games

Assuming the creep can only move in 4 directions (up, down, left right), you could make a series of if statements checking for the direction. if (directionVector.x == 1 && directionVector.y ==...

View Article


Answer by 2d4Games

Rigidbody.AddRelativeForce should be adding force over time, and giving you that smooth acceleration that you're looking for. However, I notice you have it set incredibly high, so it may simply be that...

View Article

Answer by 2d4Games

RenderSettings affects stuff in the scene as well, because it changes all of the render settings. If you want something that only changes temporarily, you could make a very large mesh around the entire...

View Article

Answer by 2d4Games

As for moving to where the player currently is as opposed to where it was, you should implement a check to see what his position is at every frame. You can then change the position of the enemy...

View Article


Answer by 2d4Games

Your player will start with that rotation because your variable ytargetRotation is equal to 10. Set xtargetRotation and ytargetRotation equal to the number you want them to start at.

View Article


Answer by 2d4Games

rigidbody.addForce and addRelativeForce are acceleration modifiers, that slowly increase speed. What you want to do is set rigidbody.velocity to a value, as that will produce instant movement and it...

View Article

Answer by 2d4Games

This isn't really a solution, more of a work-around. I was able to rework the script to set the velocity directly, rather than add a force to the rigidbody. This new method does not have the issue....

View Article

Answer by 2d4Games

So i've discovered the issue. The problem was a Joint2D variable I was using "collideConnected", has been deprecated in the latest version of unity, which is what the webplayer is running. My unity...

View Article

Answer by 2d4Games

I have figured out the problem! It turns out that the collider.bounds.center is a vector relative to the world origin (it goes from 0,0 in the world to the center of the character), while...

View Article


Answer by 2d4Games

At line 18 you're setting the timeStamp to be 2 seconds in the future, and at line 25 you're making the if statement not get triggered until those 2 seconds pass. From what I see, after you click, your...

View Article

Answer by 2d4Games

Add a check on the character that checks if the character is on that special platform or not. If the player is on the platform, then set the direction of the gravity to be towards the platform. You can...

View Article


Answer by 2d4Games

Inside a script file, you could make a setting that will change how the character movement is calculated. var gameType = 0; //0 for Parkour-Shooter //1 for Shooter-Sneak //2 for Sneak-Parkour switch...

View Article

Answer by 2d4Games

Assuming the creep can only move in 4 directions (up, down, left right), you could make a series of if statements checking for the direction. if (directionVector.x == 1 && directionVector.y ==...

View Article


Answer by 2d4Games

Rigidbody.AddRelativeForce should be adding force over time, and giving you that smooth acceleration that you're looking for. However, I notice you have it set incredibly high, so it may simply be that...

View Article

Answer by 2d4Games

RenderSettings affects stuff in the scene as well, because it changes all of the render settings. If you want something that only changes temporarily, you could make a very large mesh around the entire...

View Article

Answer by 2d4Games

As for moving to where the player currently is as opposed to where it was, you should implement a check to see what his position is at every frame. You can then change the position of the enemy...

View Article
Browsing all 24 articles
Browse latest View live




Latest Images