Howdy, Stranger!

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

How to make it so when you touch the screen your charactar jumps

edited December 2015 in Questions Posts: 87

How do you make you charectar jump when you touch the screen?
Some easy example code that you can useas a layout:

function setup()  
end
-- This function gets called once every frame
function draw ()
    -- This sets a dark background color 
    background(40, 40, 50)
        fill(255, 2, 0, 255)
    --make your charactar
    ellipse(WIDTH/4,HEIGHT/4.2,100)
    --make the ground
    fill(70, 255, 0, 255)
    rect(WIDTH/4, HEIGHT/50,550, 170)
    rectMode(RADIUS)
end

Comments

  • IgnatzIgnatz Mod
    edited December 2015 Posts: 5,396

    @magicskillz

    1. Learn how to make meshes
    2. Learn about 3D perspective

    It's quite tricky, but IMHO the most fun you can have with Codea.

    I've written an ebook on 3D in Codea, below. I wrote it because I had never done it before and found it difficult at first, so I hope it helps.

    https://www.dropbox.com/sh/mr2yzp07vffskxt/AACqVnmzpAKOkNDWENPmN4psa

    I'm happy to help you, but do some reading first!

    PS if you haven't done meshes yet, you need to learn that first, my other book on Codea covers it and there is lots of good code on the forum.

  • edited December 2015 Posts: 87

    @Ignatz
    Thanks for the help!

Sign In or Register to comment.