#Arch / Wave effect using sin
1 messages ยท Page 1 of 1 (latest)
Oh right, yeah that's the sort of effect I want
Is it worth me learning more about the Math class?
It's just generated https://i.imgur.com/rQ8FPJp.jpeg lol
try using that function @tribal zephyr
experiment a bit with it and try understanding it
I mean that's with the sin function
my knowledge of maths doesn't go that far
:p
I wish finnbon was on, they know everything ๐
Looks like I want y = sin(1 x 0.5) but I gotta somehow put that into maths
so for example
you say
I want to draw a wave from x = 0 to x = 10
you do a for loop
for (int x = 0; x <= 10; x++) {
y = sin(x * 0,5)
// set block at x, y with those values
}
@vital mauve how could you make so it starts the wave at one point and it ends at another instead of having it continuing?
Ok I got some progress
show it
yep
I need need to work out how to cut this red part out though https://i.imgur.com/xV9TTv5.png
you only want so they go up?
yeah
They use a pack to do that I know that for sure
I just remembered how they do it btw, they use trapdoors
The server I play on makes it like this, I saw it when the texture pack glitched https://i.imgur.com/jSmyND9.png
but that's just a stair
They use trap doors I'm pretty sure
search for floating blocks
I mean spawning a bunch of floating blocks with cause performance issues no?
not that much
Do you mean falling blocks? Because I can't anything for floating blocks
sth like this?
for (int x = 0; x <= 10; x++) {
double y = Math.sin(x * 0.5);
Location loc = new Location(world,x,y,z);
BlockDisplay bd = (BlockDisplay) world.spawnEntity(loc, EntityType.BLOCK_DISPLAY);
bd.setBlock(Bukkit.createBlockData(Material.STONE));
}
@tribal zephyr
What's a BlockDisplay ๐ค
new feature in 1.19.4 that allows block and item displays
they can change size, rotation and so on
u need to modify the block they displaying
I tried that and it caused a lot of performance issues