Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Dropboxing 3D objects

13

Comments

  • pacpac
    Posts: 216

    How do you get to iPads with codea to talk over osc?

  • dave1707dave1707 Mod
    Posts: 7,923

    What are you doing wrong. I have no problems when I use it.

  • pacpac
    Posts: 216

    Please show how you do it.

  • pacpac
    Posts: 216

    Does that code work over not the same network if it can’t and you know how to get it to do that they please tell.

    Thanks

  • dave1707dave1707 Mod
    Posts: 7,923

    I think it only works on the same network.

  • pacpac
    Posts: 216

    That’s okay my bro is off my back thanks it’s got him started.

    Thanks Pac

  • pacpac
    Posts: 216

    Okay need to be able to tell what object was touched in 3D space or if none were touched.

    Please help can’t seem to understand how to do this.

    Thanks Pac

  • pacpac
    Posts: 216

    don’t worry about it.

    i found a work around

  • pacpac
    edited February 2 Posts: 216

    don’t know how to delete comments

  • pacpac
    Posts: 216

    hey I am working on my space video game and found that I what be usefull to be able to have another camera in front of the ship. I know how to do that but I don’t know how you get more than one camera to show on the screen.

    thanks Pac.

  • edited February 2 Posts: 1,400

    @pac - if your current camera position is behind your ship, so that you see the ship rear in front of you, - all you need to do is move your camera in front of the ship maintaining the current viewing vector.

    Your question just made me think of one of my project problems, I was going to define 6 camera views - now I only need 1 - thanks for prompting that.

  • pacpac
    Posts: 216
    Okay so I need to be able to load in a group of different objects and change there color separately but only us one entity object.

    Is that possible?

    Thanks Pac
  • Posts: 1,400

    @pac- if you mean you want to use 1 obj model and make six entities, then I think you should be able to address them through their eseparate entity IDs. So yes.

  • pacpac
    Posts: 216

    Thank you so much.

    thanks Pac

  • pacpac
    Posts: 216
    Which 3d file formats does codea support and does it support COLLADA

    Thanks Pac
  • pacpac
    Posts: 216
    Okay so I need to know how to export and import photos to the photos app.

    Thanks :smiley:
  • pacpac
    edited March 16 Posts: 216
    Okay learned that that is not possible. But can some one tell me what 3d file format works with codea and had color/ texture.

    I am asking because I have 3ds max on my computer and I texture the stuff in there because I don’t know how to texture some parts of the object 1 way an the others and different way in codea. If you could yell me that I could use that.

    Thanks Pac
  • pacpac
    Posts: 216

    do .obj files hold texture / color because if they do they don’t on my ipad.

  • Posts: 1,400

    @pac - obj files can hold color but it has to be incorporated in the file with the right format. It is not used very often. When applied it just colours the vertices, so you can add colour gradients or solid coloured triangles.

    Most users tend to use textures as that gives you a much better 3D effect. They are incorporated in the obj file as a series of points which relate to a specific texture and vertex. You need to read up on this - chase up the 3D epub from ignatz on his website - you might find it in the Codea wiki.

    Oh, when using textures you also need a materials file which incorporates lighting properties and texture file details.

  • pacpac
    Posts: 216
    Its okay I have found every thing I need for the color.

    How do you set the pivot point of an object?

    Thanks Pac
  • pacpac
    Posts: 216
    What file type can I put into codea to add music?

    Thanks Pac
  • Posts: 419
    .wav
  • dave1707dave1707 Mod
    Posts: 7,923

    .mp3

  • pacpac
    Posts: 216
    Oh thats great.

    Thank you so much.
    Thanks again pac
  • Posts: 344

    pac it would help others -- like me -- if you would post some examples of how you've done things. :) thanks!

  • pacpac
    edited March 25 Posts: 216

    What things do you need posted?

    Or what areas more like.

    :wink:

  • pacpac
    Posts: 216
    Can you program in app purchases?
  • pacpac
    Posts: 216

    Okay got a question.

    So how can you get a loop to print all the sprites from drop box on the the screen?

    Thank @Pac

  • dave1707dave1707 Mod
    Posts: 7,923

    Look in the built in reference under Storage for assetList.

  • pacpac
    Posts: 216

    Okay thank, different question how do you pass in a table to a tween path with out knowing how many point there will be.

  • pacpac
    Posts: 216

    Oh okay I went and checked the reference and I fell dumb. But I get that felling a lot.

    Thanks Pac.

  • dave1707dave1707 Mod
    edited April 2 Posts: 7,923

    @pac Here's an example showing all the sprites in Blocks.

    function setup()
        al=assetList("Blocks",SPRITES)
        for a,b in pairs(al) do
            print(a,b)
        end
        fill(255)
    end
    
    function draw()
        background(40, 40, 50)    
        x,y=1,1
        for a,b in pairs(al) do
            sprite("Blocks:"..b,x*65,y*65,50)
            x=x+1
            if x>10 then
                y=y+1
                x=1
            end
        end
        text("Blocks",WIDTH/2,HEIGHT-50)
        text("use landscape orientation",WIDTH/2,HEIGHT-100)
    end
    
  • dave1707dave1707 Mod
    Posts: 7,923

    @pac This doesn't pass a table to tween, but it uses one in tween. I'm using the Asset list from the above code.

    displayMode(FULLSCREEN)
    
    function setup()
        al=assetList("Blocks",SPRITES)
        sp={x=0,y=HEIGHT/2,a=1}
        tween(5,sp,{x=WIDTH,y=HEIGHT/2,a=#al},
            {easing=tween.easing.linear,loop=tween.loop.once})
    end
    
    function draw()
        background(40, 40, 50)
        sprite("Blocks:"..al[sp.a//1],sp.x,sp.y,50)
    end
    
  • pacpac
    Posts: 216

    How can you tell if a tween has finished?

  • dave1707dave1707 Mod
    Posts: 7,923

    Add a function to the tween. In this case, done.

    displayMode(FULLSCREEN)
    
    function setup()
        str=""
        al=assetList("Blocks",SPRITES)
        sp={x=0,y=HEIGHT/2,a=1}
        tween(5,sp,{x=WIDTH,y=HEIGHT/2,a=#al},
            {easing=tween.easing.linear,loop=tween.loop.once},done)
        fill(255)
    end
    
    function draw()
        background(0)
        sprite("Blocks:"..al[sp.a//1],sp.x,sp.y,50)
        text(str,WIDTH/2,HEIGHT/2)
    end
    
    function done()
        str="DONE"    
    end
    
  • pacpac
    Posts: 216
    Got it Thanks

    Thank You so much.
  • Posts: 68

    Hi,

    You can use tween.hasExpired() function (not documented)

    displayMode(FULLSCREEN)
    
    function setup()
    
        al=assetList("Blocks",SPRITES)
        sp={x=0,y=HEIGHT/2,a=1}
        id=tween(5,sp,{x=WIDTH,y=HEIGHT/2,a=#al},
            {easing=tween.easing.linear,loop=tween.loop.once})
        fill(255)
    end
    
    function draw()
        background(0)
        sprite("Blocks:"..al[sp.a//1],sp.x,sp.y,50)
    
        if tween.hasExpired(id) then
           text("Done",WIDTH/2,HEIGHT/2)
        end 
    
    end
    
  • dave1707dave1707 Mod
    Posts: 7,923

    @Diablo76 Thanks for the update. I wonder how many other undocumented functions there are.

  • Posts: 68

    @dave1707 not many, they are serious boys @Simeon and @John ;)

  • pacpac
    Posts: 216

    Thanks @Diablo76 Your worked so now I may keep going on the project.

    Thanks for the help @dave1707 your was not bad but I could not figure it out.

    Thanks you guys.

    @pac out.

  • dave1707dave1707 Mod
    Posts: 7,923

    @pac What did you have trouble with. Was it the code for the assetList table or the callback function when a tween is complete.

  • pacpac
    Posts: 216

    When I put it into my code It keep calling the function when it started and not when it ended. But it is okay when I used yours and @Diablo76’s I got it to work.

    Thanks Pac

  • pacpac
    Posts: 216

    can you do Go To ‘s?

    thanks Pac

  • pacpac
    Posts: 216

    Never mind I figured out a way

  • pacpac
    Posts: 216
    Okay so is there any way to have photos export a photo to my program if I published it?
  • pacpac
    Posts: 216

    Okay I have been stuck here all day. So please help.

    So I have an array of entities and I need to save them , I have been using json encode / decode but it saves the array they I don’t know how to get the info back out. Please Help.

    Thanks Pac

  • dave1707dave1707 Mod
    Posts: 7,923

    Look at the Craft examples, Learn Craft:The Sky and Voxel Player:Block Inventory. Both of those use json encode, decode.

  • pacpac
    Posts: 216
    Okay but I did not follow the Player:block inventory example.

    Thanks Pac
  • pacpac
    Posts: 216

    I just need help getting my head around this Ar.

    I want to make a game in Ar but I can get how to it works.

    So a general over view of Ar would be very very useful

    Thanks Pac

Sign In or Register to comment.