Lesson 14 problem..
Lesson 14 problem..
Okay so I was following along in lesson 14 and I got up to the part where we were writing the code for the hit collision with the walls and making it bounce back. When I compiled the code everything went smooth, but once I ran the program I would get an error and in the debugger it says that y was at -3 or -2 so I know there's some kind of problem around the collision part but I can't seem to find where at.
- Attachments
-
- Chili DirectX Framework.rar
- (39.08 KiB) Downloaded 179 times
Re: Lesson 14 problem..
Your poo is sometimes moving outside, and other times spawning form the otherside (eg. leaves bottom and spawns from top) Have another look at the poo collision code.
ʕ •ᴥ•ʔ
Re: Lesson 14 problem..
Thanks, it turns out I wrote
pooYVelocity[ index ] = -pooYVelocity[ index ];
as
pooY[ index ] = -pooYVelocity[ index ];
smh -_-
pooYVelocity[ index ] = -pooYVelocity[ index ];
as
pooY[ index ] = -pooYVelocity[ index ];
smh -_-