Bullets only shoot right

EDIT: I’m a dummy, didn’t change bulletSpeed to xSpeed)

Lessons learned: Double check code, place right tags in forum and give enough information for people to actually help!

Lecture 100

Today is like the day of problems after a couple of smooth weeks!

As per the video, Rick has the bullets shooting right, when facing right and left when facing left, my bullets won’t shoot to the left at all, only the right. The code is the same as Rick’s so I’m guessing I’ve done something wrong in the hierarchy
Bullet shoot Back
or inspector somehow?

Snip of code

Snip of bullet hierarchy

Player hierarchy 1

Player hierarchy 2

If you want help post snippets of your code and screenshot of the hierarchy, not sure if you do since you marked it as a “Talk” topic.

1 Like

Hopefully put it in the right topic area and added enough info now!

Are you sure you’re meant to be using bulletSpeed in your update function and not xSpeed? You’re declaring xSpeed and calculating it using bulletSpeed but you never actually use it.

I have no context of your course so I’m working blind here but that’s what stands out to me.

1 Like

That was it, just figured it out a second ago, whoops!

Also is there anyway to wrap it under the right course? I assumed it would go under the right course as I’ve followed the link from the lecture?

The tags wrap it under the right course and lecture but only GameDevTV personnel has access to all the courses and knows their content. Your posts are automatically posted to the community feed where other users like me can view them and try to help.

1 Like

Aah brill, thanks for the info, I’ll add more context rather than assume people know what I’m talking about haha

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms