Just keep it simple with sin and cos - minecraft post gives an example
I purposely made a raft floating with wind cause I saw this thread - it would be use full
// Project: ??
// Created: 2018-03-03
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "platform" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
type _platform
id
pivot
x#,y#,z#
size#
planks as integer[8]
planksize#
rods as integer[5]
endtype
global platform as _platform
platform.size#=1
platform.planksize#=10
for planks = 0 to platform.planks.length-1
platform.planks[planks]=CreateObjectCylinder(platform.planksize#,platform.size#,10)
SetObjectPosition(platform.planks[planks],platform.size#+.1,0,0)
SetObjectColor(platform.planks[planks],86,47,14,255)
// SetObjectRotation(platform.planks[planks],90,0,0)
if planks>0 then FixObjectToObject(platform.planks[planks],platform.planks[planks-1])
next
crossbeam = CreateObjectCylinder(platform.planks.length+1,platform.size#,8)
SetObjectRotation(crossbeam,90,90,0)
SetObjectPosition(crossbeam,-platform.planks.length/2,platform.planks.length/2,-platform.size#/2)
FixObjectToObject(crossbeam,platform.planks[planks-1])
SetObjectColor(crossbeam,86,47,14,255)
crossbeam = CreateObjectCylinder(platform.planks.length+1,platform.size#,8)
SetObjectRotation(crossbeam,90,90,0)
SetObjectPosition(crossbeam,-platform.planks.length/2,-platform.planks.length/2,-platform.size#/2)
FixObjectToObject(crossbeam,platform.planks[planks-1])
SetObjectColor(crossbeam,86,47,14,255)
platform.pivot=CreateObjectSphere(.05,.05,.05)
SetObjectPosition(platform.planks[0],-4,0,0)
FixObjectToObject(platform.planks[0],platform.pivot)
SetObjectRotation(platform.pivot,0,90,0)
plane=CreateObjectPlane(1000,1000)
SetObjectRotation(plane,90,0,0)
SetObjectColor(plane,0,105,148,255)
x#=90:y#=0:z#=0:angle#=0:wavestrength#=3
do
SetObjectRotation(platform.pivot,x#,y#,z#)
inc y#,1.1
x#=x#+sin(angle#)
z#=z#+cos(angle#)
inc angle#,.2
if angle#>2 then angle#=-wavestrength#
Print( ScreenFPS() )
Sync()
loop