### Author Topic: Coding Help  (Read 13845 times)

0 Members and 2 Guests are viewing this topic.

#### Pilchard123

• Tester
• Old Oak
• Thank You
• -Given: 4
• Posts: 929
• Eufloria: Yes
##### Re: Coding Help
« Reply #15 on: December 06, 2011, 03:24:39 AM »
If moving your mouse moves the camera like in Minecraft, that's easy enough to do.

If your mouse is over it, you are looking at it.

#### Aino

• Ent
• Thank You
• -Given: 4
• Posts: 1,523
• They'll eat you next!
• Eufloria: Yes
##### Re: Coding Help
« Reply #16 on: December 06, 2011, 03:40:32 AM »
But, it's more complicated than that, in LWJGL(I'm not making my own 3D engine ever!) I don't think it tells where the block is placed on the screen...

But I have two variables, Yaw and Pitch, maybe it works?

I could do it this way(lua style! ):

Code: [Select]
`for range = 0.2,1.6 dotile =getTile(math.floor(X+math.cos(Yaw)*range),math.floor(Y+math.sin(Yaw)*range);if (tile ~= nil and tile.getX() ~= math.floor(player.getX()) and tile.getY() ~= math.floor(player.getY()) and tile.getSolid()) thenreturn tile;endendreturn nil;`
It's a little different in java, almost left some pieces of java code there. I'm too used to it

X = player pos X(float)
Y = player pos Y(float)
Yaw = yaw rotation
Tile = a block
« Last Edit: December 06, 2011, 03:45:17 AM by Aino »

#### Darkzlime

• Seed
• Thank You
• -Given: 0
• Posts: 2
##### Re: Coding Help
« Reply #17 on: December 07, 2011, 05:48:25 AM »
make a boolean that gets the dimensions of the box and checks if its true

#### Pilchard123

• Tester
• Old Oak
• Thank You
• -Given: 4
• Posts: 929
• Eufloria: Yes
##### Re: Coding Help
« Reply #18 on: December 15, 2011, 03:17:00 AM »
Not really wanting help, more trumpet-blowing.

I just got a multithreaded VB.Net program running.

#### kmercy

• Seedling
• Thank You
• -Given: 0
• Posts: 34
##### Re: Coding Help
« Reply #19 on: December 15, 2011, 07:45:39 AM »
Not really wanting help, more trumpet-blowing.

I just got a multithreaded VB.Net program running.

#### Aino

• Ent
• Thank You
• -Given: 4
• Posts: 1,523
• They'll eat you next!
• Eufloria: Yes
##### Re: Coding Help
« Reply #20 on: December 15, 2011, 05:47:48 PM »
Kmercy, don't look down, look up.

#### Pilchard123

• Tester
• Old Oak
• Thank You
• -Given: 4
• Posts: 929
• Eufloria: Yes
##### Re: Coding Help
« Reply #21 on: December 16, 2011, 01:07:44 AM »
I know, but it's made my bruteforcing sooo much easier. In the region of 2min to ~ 1second.

• Ent
• Thank You
• -Given: 4