[Mod] Realistic Hang Glider [glider]

Post Reply
User avatar
CBugDCoder
Member
Posts: 32
Joined: Tue Jul 31, 2018 12:13
GitHub: CBugDCoder
IRC: CBugDCoder
In-game: CalebDavis
Location: Home

[Mod] Realistic Hang Glider [glider]

by CBugDCoder » Post

Have you ever seen a mountain and said to yourself, "I wish that I could fly from the top of that mountain"?

Well you have to wish no longer.

Introducing the glider mod.

Image

You simply have to punch while holding the glider to soar into the air.
You can also craft rockets to give yourself a power boost and really take flight.

Source Code: Github
ContentDB: https://content.minetest.net/packages/C ... er/glider/

License:
  • Code: MIT
    Assets: CC BY4.0
Last edited by CBugDCoder on Tue Mar 10, 2020 02:32, edited 1 time in total.
My Mods: Mob AI Glider

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: [Mod] Realistic Hang Glider [glider]

by Extex » Post

You misspelt recipe. Spelt recipie
Which resulted in a crash.
Last edited by Extex on Wed Aug 31, 2022 19:31, edited 1 time in total.
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
CBugDCoder
Member
Posts: 32
Joined: Tue Jul 31, 2018 12:13
GitHub: CBugDCoder
IRC: CBugDCoder
In-game: CalebDavis
Location: Home

Re: [Mod] Realistic Hang Glider [glider]

by CBugDCoder » Post

Fixed
My Mods: Mob AI Glider

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Issues with the mod!

by pampogokiraly » Post

This mod is Awesome!
I really like how i can fly with the glider... But i have found some issues :(
  1. glitchy! Yap.. I just fly, take a turn.. hmmm.. it doasent rotates.. WHOA!! i just crashed! This happens sometimes.. i just fly it doasent turns and then it just make a sharp turn in 1 sec and i crash somewhere.
  2. With the first issue, comes a second: I just fly and take a turn, then the glitch happens and the glider is directly in my eyes.. if you cant fix the first issue, then i suggest to make the glider invisible in the first person vision (sorry, my english is bad)
  3. I can fly infinitely. I just use one rocket to boost myself up a bit, then go down 50 blocks and pull the glider up again and i can fly up more than 250 blocks... That sounds a lot like cheating!
But still... This mod is Awesome
All praise the Bacon God! The one and only god in MineTest

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Realistic Hang Glider [glider]

by runs » Post

What is the difference with pyrollo's one?

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Realistic Hang Glider [glider]

by pampogokiraly » Post

runs wrote:What is the difference with pyrollo's one?
This is more like an elytra from MC
All praise the Bacon God! The one and only god in MineTest

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

Re: [Mod] Realistic Hang Glider [glider]

by Pyrollo » Post

runs wrote:What is the difference with pyrollo's one?
The difference is: I have no glider mod at all :D
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Realistic Hang Glider [glider]

by runs » Post

Pyrollo wrote:
runs wrote:What is the difference with pyrollo's one?
The difference is: I have no glider mod at all :D
You are right, LOL, I meant the Piezo's one, hanggliders.

Oh, cool, now I understand it is a kind of "wings". I will give it a try.

User avatar
CBugDCoder
Member
Posts: 32
Joined: Tue Jul 31, 2018 12:13
GitHub: CBugDCoder
IRC: CBugDCoder
In-game: CalebDavis
Location: Home

Re: Issues with the mod!

by CBugDCoder » Post

pampogokiraly wrote: I really like how i can fly with the glider... But i have found some issues :(
  1. glitchy! Yap.. I just fly, take a turn.. hmmm.. it doasent rotates.. WHOA!! i just crashed! This happens sometimes.. i just fly it doasent turns and then it just make a sharp turn in 1 sec and i crash somewhere.
  2. With the first issue, comes a second: I just fly and take a turn, then the glitch happens and the glider is directly in my eyes.. if you cant fix the first issue, then i suggest to make the glider invisible in the first person vision (sorry, my english is bad)
  3. I can fly infinitely. I just use one rocket to boost myself up a bit, then go down 50 blocks and pull the glider up again and i can fly up more than 250 blocks... That sounds a lot like cheating!
Thank you for testing out my mod. I am working on fixing the problems you described.
My Mods: Mob AI Glider

User avatar
eyekay
Member
Posts: 67
Joined: Fri Feb 07, 2020 10:49
GitHub: Azl-Eyekay
In-game: eyekay49
Contact:

Re: Issues with the mod!

by eyekay » Post

pampogokiraly wrote:
Wed Apr 15, 2020 09:52
[*]I can fly infinitely. I just use one rocket to boost myself up a bit, then go down 50 blocks and pull the glider up again and i can fly up more than 250 blocks... That sounds a lot like cheating!
I don't think its intentional but this exists in MC as well, its called the 40-40 trick and it occurs when we fly at roughly 40 degrees.
<a href=about:blank> My projects</a>

Astrobe
Member
Posts: 572
Joined: Sun Apr 01, 2018 10:46

Re: [Mod] Realistic Hang Glider [glider]

by Astrobe » Post

Don't have (and don't want) a Github account for this, regarding the two hanging crash reports:

About the crash that happens when a player gets disconnected when using the glider: add this check at the beginning of the on_step() function, after the "local driver=..." line:

Code: Select all

if not driver then
  self.object:remove()
  return
end
For the other crash issue, the report is light on details but it looks like the glider "entity" unexpectedly died (hit by a bird?). A quick-and-dirty fix could be to give more HP to it. Insert the following line in the definition of glider:hangglider :

Code: Select all

hp_max=9999

QBSteve
Member
Posts: 19
Joined: Wed Mar 15, 2023 00:00
In-game: QBSteve

Re: [Mod] Realistic Hang Glider [glider]

by QBSteve » Post

This is a great mod! However, the glider has infinite durability. Maybe I'll try to fix that, without any knowledge of Lua XD
Edit: I somehow did it without breaking the mod lol. I also removed the rockets, since I thought that it doesn't belong in this mod (but that's my opinion). Here's the function that I slightly modified:

Code: Select all

minetest.register_tool("glider:glider", {
	description = "Glider",
	inventory_image = "glider_glider.png",
	on_use = function(itemstack, user, pt)
		local name = user:get_player_name()
		local pos = user:get_pos()
		local attach = user:get_attach()
		local luaent = nil
		if attach then 
			luaent = attach:get_luaentity()
			if luaent.name == "glider:hangglider" then
				local vel = attach:get_velocity()
				attach:remove()
				user:set_detach()
				user:set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0})
				user:add_player_velocity(vel)
			end
		else
			pos.y = pos.y + 1.5
			local ent = minetest.add_entity(pos, "glider:hangglider")
			luaent = ent:get_luaentity()
			luaent.driver = name
			local rot = {y = user:get_look_horizontal(), x = -user:get_look_vertical(), z = 0}
			ent:set_rotation(rot)
			local vel = vector.multiply(user:get_player_velocity(),2)
			ent:set_velocity(vel)
			luaent.speed = math.sqrt(vel.x^2+(vel.y/4)^2+vel.z^2)
			user:set_attach(ent, "", {x=0,y=0,z=-10}, {x=90,y=0,z=0})
			user:set_eye_offset({x=0,y=-16.25,z=0},{x=0,y=-15,z=0})
                itemstack:set_wear(itemstack:get_wear() + 255)
                return itemstack
		end
	end,
})
P.S. I think this only works for Minetest 5.0+
By the way, I borrowed some code from this mod: https://content.minetest.net/packages/P ... angglider/
Hello! I'm just some random person with an ancient 7 year old potato that is my laptop :)

chef trip
Member
Posts: 57
Joined: Tue May 18, 2021 03:49
GitHub: teklife
In-game: yuh

Re: [Mod] Realistic Hang Glider [glider]

by chef trip » Post

thanks, party pooper :p
QBSteve wrote:
Sun Apr 02, 2023 00:18
This is a great mod! However, the glider has infinite durability. Maybe I'll try to fix that, without any knowledge of Lua XD
Edit: I somehow did it without breaking the mod lol. I also removed the rockets, since I thought that it doesn't belong in this mod (but that's my opinion). Here's the function that I slightly modified:

Code: Select all

minetest.register_tool("glider:glider", {
	description = "Glider",
	inventory_image = "glider_glider.png",
	on_use = function(itemstack, user, pt)
		local name = user:get_player_name()
		local pos = user:get_pos()
		local attach = user:get_attach()
		local luaent = nil
		if attach then 
			luaent = attach:get_luaentity()
			if luaent.name == "glider:hangglider" then
				local vel = attach:get_velocity()
				attach:remove()
				user:set_detach()
				user:set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0})
				user:add_player_velocity(vel)
			end
		else
			pos.y = pos.y + 1.5
			local ent = minetest.add_entity(pos, "glider:hangglider")
			luaent = ent:get_luaentity()
			luaent.driver = name
			local rot = {y = user:get_look_horizontal(), x = -user:get_look_vertical(), z = 0}
			ent:set_rotation(rot)
			local vel = vector.multiply(user:get_player_velocity(),2)
			ent:set_velocity(vel)
			luaent.speed = math.sqrt(vel.x^2+(vel.y/4)^2+vel.z^2)
			user:set_attach(ent, "", {x=0,y=0,z=-10}, {x=90,y=0,z=0})
			user:set_eye_offset({x=0,y=-16.25,z=0},{x=0,y=-15,z=0})
                itemstack:set_wear(itemstack:get_wear() + 255)
                return itemstack
		end
	end,
})
P.S. I think this only works for Minetest 5.0+
By the way, I borrowed some code from this mod: https://content.minetest.net/packages/P ... angglider/
Wanting to be someone else is a waste of who you are. – Kurt Cobain

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests