Tutorial 06 - Selecting an Object

View previous topic View next topic Go down

Tutorial 06 - Selecting an Object

Post  Jawdy on Thu Mar 26, 2009 3:13 am

I'm trying to make my code select an object and just update a integer when the object is selected, so not change the material of the object. I figure that the selected object is being re-drawn as a new instance, and in the tutorial there is a comment that says that SIO2 will remember the last drawn material - is there a way to call the material of my existing object and have the "selection" object use that material when rendered?
avatar
Jawdy

Posts : 65
Join date : 2009-03-17
Location : UK

View user profile http://www.gaslightgames.co.uk

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  sio2interactive on Thu Mar 26, 2009 4:02 am

Check tutorial06_1

Double Tap: Select the object

Triple Tap: Duplicate the select object

And you got in there all the twist concerning the materials...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  Jawdy on Thu Mar 26, 2009 4:07 am

I'll check again - no doubts I've just missed something glarringly simple!

I have modified the double tap to only be a single tap (as that's what I need)... but I'll check when I'm in front of my Mac.

Thanks Very Happy
avatar
Jawdy

Posts : 65
Join date : 2009-03-17
Location : UK

View user profile http://www.gaslightgames.co.uk

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  Jawdy on Thu Mar 26, 2009 2:49 pm

Well, after a few more hours, and tearing the remains of my hair out - I'm no closer to figuring this one out.

even if I touch nothing, so I don't create a Selection object (selection should be reset from sio2ObjectReset, or am I misunderstanding the function?) it creates an object (or not) with no material, but if I select the area where the object is, I get a Touch=YES (my own little test) but no visible object (material wiped).

I fiddled around with the render placement, and I can get a "white" or blank material, but never do I get my original one back. I just can't figure it out - must've taken my stupid pills all day today :-/

Any help? Pointers? I've gone over Tut 06_1 so many times I just can't see where the original material gets loaded back again.
avatar
Jawdy

Posts : 65
Join date : 2009-03-17
Location : UK

View user profile http://www.gaslightgames.co.uk

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  meteors on Thu Mar 26, 2009 3:26 pm

Just out of curiousity, do your objects move?

If they're static, then you can simply hardcode the hotspots in the screen touch callback :-)


-j
avatar
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

View user profile

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  Jawdy on Thu Mar 26, 2009 3:28 pm

meteors wrote:Just out of curiousity, do your objects move?

If they're static, then you can simply hardcode the hotspots in the screen touch callback :-)


-j
They are all static, now that you mention it...
Hmm
avatar
Jawdy

Posts : 65
Join date : 2009-03-17
Location : UK

View user profile http://www.gaslightgames.co.uk

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  meteors on Thu Mar 26, 2009 3:58 pm

Then I would definitely do it that way. K.I.S.S.


-j
avatar
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

View user profile

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  Jawdy on Thu Mar 26, 2009 4:31 pm

Before I go on and do something else - I just wanted to see what would happen to SIO2's Tutorial 06 if I take out all the selection/instance material stuff... well, it works exactly how I want my app to work. Bwahahahaha.
*ahem*
So, clearly, I've done something... erm... not right!

Sorry for the near-pointless post!

PS: sio2Interactive - you were right! As usual ;-)
avatar
Jawdy

Posts : 65
Join date : 2009-03-17
Location : UK

View user profile http://www.gaslightgames.co.uk

Back to top Go down

Re: Tutorial 06 - Selecting an Object

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum