Well I’m on step5 of beginner and absolutely love it.
I can actually write collision from scratch now and understand how it works (more or LESS!)
Another minor point: Took me a while to figure out what “ASA” means. I assume it’s “as soon as”?
Maybe global find-and-replace of ASA with explicit wording will be nicer
Also I have a bone to pick with you over something completely silly! In the tutorial step4.py you say that you “slim” the code by pointing both accept calls to the same function:
def collideEventIn(entry):
colliderNode = entry.getIntoNode()
if colliderNode.getName() == 'smileycnode':
smileyModel.setColor(1,1,1,1)
heartModel.setScale(1.5)
elif colliderNode.getName() == 'frowneycnode':
frowneyModel.setColor(1,1,1,1)
brkheartModel.setScale(1.5)
#... and this when they leave each other alone.
def collideEventOut(entry):
colliderNode = entry.getIntoNode()
if colliderNode.getName() == 'smileycnode':
smileyModel.setColor(.4,.4,.4,1)
heartModel.setScale(1.0)
elif colliderNode.getName() == 'frowneycnode':
frowneyModel.setColor(.4,.4,.4,1)
brkheartModel.setScale(1.0)
However, when I did it myself, I pointed it to different functions and I had less lines of code
def heartCollisionEnter(event):
smileyModel.setColor(1,1,1,1)
heartModel.setScale(1.5)
def heartCollisionLeave(event):
smileyModel.setColor(1,1,1,1)
heartModel.setScale(1.5)
def brokenHeartCollisionEnter(event):
smileyModel.setColor(1,1,1,1)
heartModel.setScale(1.5)
def brokenHeartCollisionLeave(event):
smileyModel.setColor(1,1,1,1)
heartModel.setScale(1.5)
(Ignore the actual parameters).
But I think you should keep it pointing to the same function - because I actually didn’t know that you could do that. Maybe just remove the claim that it’s “to slim the code”.
Then again, this is really stupid thing, and I probably just need to sleeps more…
Thanks again for the tutorial.
Can’t believe this is not sticky!