FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Tutorial 06 - Selecting an Object

3 posters

Go down

Tutorial 06 - Selecting an Object Empty Tutorial 06 - Selecting an Object

Post  Jawdy 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?
Jawdy
Jawdy

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

http://www.gaslightgames.co.uk

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  sio2interactive 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...
sio2interactive
sio2interactive

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

http://sio2interactive.com

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  Jawdy 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
Jawdy
Jawdy

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

http://www.gaslightgames.co.uk

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  Jawdy 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.
Jawdy
Jawdy

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

http://www.gaslightgames.co.uk

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  meteors 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
meteors
meteors

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

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  Jawdy 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
Jawdy
Jawdy

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

http://www.gaslightgames.co.uk

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  meteors Thu Mar 26, 2009 3:58 pm

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


-j
meteors
meteors

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

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  Jawdy 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 ;-)
Jawdy
Jawdy

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

http://www.gaslightgames.co.uk

Back to top Go down

Tutorial 06 - Selecting an Object Empty Re: Tutorial 06 - Selecting an Object

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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