Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

objectPointAt()

Purpose

Set where a 3D object is pointing

Description

Change the point where a 3D object is pointing to

Syntax

objectPointAt( handle, point )

Arguments

handle variable which stores the placed 3D object

point vector containing the point in 3 dimensions { x, y, z }

Example

cb = loadModel( "Kat Deak/Colin" )
pointLight( { 0.5, 1.3, 2 }, white, 4 )
setambientlight( { 0.5, 0.5, 0.5 } )
pos = { 0, 0, 0 }
scale = { 1, 1, 1 }
colin = placeObject( cb, pos, scale )
point = { 0, 10, 10 }
setcamera( point, { 0, 5, 0 } )
animID = 10
animlength = animationLength( colin, animID )
animframe = 0

loop
    clear()
    c = controls( 0 )
    if c.left then
        point.x -= 0.1
    endIf
    if c.right then
        point.x += 0.1
    endIf
    if c.up then
        point.y += 0.1
    endIf
    if c.down then
        point.y -= 0.1
    endIf
    objectPointAt( colin, point )
    animframe = animframe + 1 / 60
    if animframe >= animlength then
        animframe = 0
    endIf
    updateAnimation( colin, animID, animframe )
    drawObjects()
    printAt( 0, 0, "Use left joypad to move where object is pointing" )
    update()
repeat

Associated Commands

drawObjects(), loadModel(), objectPointAt(), placeObject(), removeObject(), rotateObject(), setObjectMaterial(), setObjectPos(), setObjectScale()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.