Lesson 14 problem..

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
kratrs
Posts: 8
Joined: May 22nd, 2012, 2:46 am
Location: California

Lesson 14 problem..

Post by kratrs » June 5th, 2012, 1:30 am

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
Image

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Lesson 14 problem..

Post by LuX » June 5th, 2012, 10:13 am

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.
ʕ •ᴥ•ʔ

kratrs
Posts: 8
Joined: May 22nd, 2012, 2:46 am
Location: California

Re: Lesson 14 problem..

Post by kratrs » June 5th, 2012, 11:35 pm

Thanks, it turns out I wrote
pooYVelocity[ index ] = -pooYVelocity[ index ];
as
pooY[ index ] = -pooYVelocity[ index ];
smh -_-
Image

Post Reply