Notifications
bg
HyperBrid
Freelance Game Developer - Student
0
Likes
2
Followers
1
Connection
All
Articles0
Games1
Showcases0
Column1
Jobs0
HyperBrid
published the game
May 8, 2020
Hunting Spree
My first project: A 2D-roguelike game about hunting animals
How did you guys implement the homework task for project 5 session 1? (Making sure objects don't spawn below each other)
I thought about a couple of ways but they felt a little cheaty (They wouldn't work if the project was a little different)

For prototype 4, homework 3 (Different powerups), the gist of it is pretty simple but i want to know whether there better is a dynamic way to store the powerup prefabs in the spawn manager without hard-coding them. The best I could do was check for their names (Making multiple tags would make it very unorganized)

In the week 4 session 3 challenge (Making the player walk into the screen), using the transform component to create animations seems to break the rigidbody (the player stops jumping as no force is applied but the animation works fine). Am I doing something wrong?

HyperBrid
Freelance Game Developer
a month ago
Reply@Ruben ZuidgeestSince you use the transform component, a rigidbody can't function. Using a transform component basically locks a character in to a predefined motion where no forces can change the course. I would use the playerRb.AddForce function to try and replicate what you have animated.
I actually tried that but realized that the position was frozen on x and z on the rigid body
RZ
a month ago
Since you use the transform component, a rigidbody can't function. Using a transform component basically locks a character in to a predefined motion where no forces can change the course. I would use the playerRb.AddForce function to try and replicate what you have animated.
How can we play the jump animation twice without the exitTime flag if the player does a double jump?

HyperBrid
Freelance Game Developer
a month ago
Because the animation has exit time and if we uncheck that then the animation will get interrupted by the run animation
HyperBrid
Freelance Game Developer
a month ago
I implemented it in a different way. However, my question was solely on how to play the animation twice?
CK
a month ago
Same way as the regular jump, except you use "OnCollisionExit" instead of "OnCollisionEnter" like so: private bool isDoubleJump = false private void OnCollisionExit(Collision collision) { isDoubleJump = true; } Then setup your "if" statement like so: if (Input.GetKeyDown("space") && isOnGround && !isGameOver) { playerRB.AddForce(Vector3.up * jumpHeight, ForceMode.Impulse); isOnGround = false; playerAnim.SetTrigger("Jump_trig"); } else if (Input.GetKeyDown("space") && isDoubleJump && !isGameOver) { playerRB.AddForce(Vector3.up * jumpHeight, ForceMode.Impulse); isDoubleJump = false; } This will set ground to true while on the ground, and double jump to true while in the air once. Cheers!
About Me
Young game developer aiming to become a AAA game designer. Have yet to attend university and...
Capital Brand Technologies
Junior Game Developer
See more
Skills
No skills added yet
Certifications (0)
Import
See all
HyperBrid's liked projects (0)
No likes yet
Following (2)
Followers (2)
Following Companies (0)
Not following anyone yet